home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ARASAN_S.ZIP / NOTATION.H < prev    next >
C/C++ Source or Header  |  1994-02-19  |  858b  |  30 lines

  1. // Copyright 1994 by Jon Dart.  All Rights Reserved.
  2.  
  3. #ifndef _NOTATION_H
  4. #define _NOTATION_H
  5.  
  6. #include "color.h"
  7. class Board;
  8. class Move;
  9.  
  10. class Notation
  11. {
  12.     // This class converts our internal move representation to
  13.     // and from standard algebraic notation.
  14.     
  15. public:
  16.     static void Image(const Board &b, const Move &m,
  17.         char *result );
  18.     // Returns a human-readable string image of a move in "result".
  19.     // "b" must be the board position before the move is made.
  20.  
  21.     static Move Value( const Board &b,
  22.         const ColorType color, char *str);
  23.     // Parses "str", assuming it contains a move for side "color",
  24.     // in the same string format returned by Image().  Returns
  25.     // NullMove if the string cannot be parsed or if the move is
  26.     // ambiguous.  Note: a successful return value does not
  27.     // necessarily mean the move is legal.
  28. };
  29.  
  30. #endif